
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>   
    <title>DataConverge</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">	    
    	function showTagDetail(tagId){
    		var url="analyze.htm?action=showChildTagsInfo&tagId="+tagId;
    		document.location.href=url;
    	}
    	
    	function showNumChart(){
    		var url="analyze.htm?action=showNumChart";
    		document.location.href=url;
    	}
    	
    	function showFundChart(){
    		var url="analyze.htm?action=showFundChart";
    		document.location.href=url;
    	}
    	
    	function goBack(){
    		var tagId=document.getElementById("parentTagId").value;
    		document.location.href="analyze.htm?action=showChildTagsInfo&tagId="+tagId;
    	}
    	
    </script>
  </head>
  
  <body>
   	<div align="center"><font size="5"><strong>统计结果表</strong></font></div>
   	<input type="hidden" id="parentTagId" name="parentTagId" value="${parentTagId}"/>
   	<TABLE width="95%" align="center" border="1">
   		<TR>
   			<TD>&nbsp;</TD>
   			<c:forEach items="${tagList}" var="tagNode" varStatus="status0"> 
   				<c:if test="${!tagNode.end}">				
   					<TD><a href="#" onclick="showTagDetail('${tagNode.tagId}')"><c:out value="${tagNode.tagName}"/></a></TD>
   				</c:if>
   				<c:if test="${tagNode.end}">				
   					<TD><c:out value="${tagNode.tagName}"/></TD>
   				</c:if>
   			</c:forEach>
   			<TD>课题总数</TD>
   			<TD>中标经费(万元)</TD>
   		</TR>
   			<c:forEach items="${dataMap}" var="mapItem" varStatus="status1"> 	
   				<TR>
   					<TD><c:out value="${mapItem.key}"/></TD>  					
   						<c:forEach items="${mapItem.value}" var="value" varStatus="status2"> 	
   							<TD><c:if test="${status1.first && !status2.last}"><strong><c:out value="${value}"/></strong></c:if>
   							<c:if test="${status2.last}"><font color="red"><strong><c:out value="${value}"/></strong></font></c:if>
   							<c:if test="${!status1.first && status2.index==(width-2)}"><strong><c:out value="${value}"/></strong></c:if>
   							<c:if test="${!status1.first && !status2.last && (status2.index!=(width-2))}"><c:out value="${value}"/></c:if>
   							</TD>
   						</c:forEach>   					
   				</TR>
   	  	    </c:forEach>

   	   <TR>
   	   		<TD>中标经费(万元)</TD>
   	   		<c:forEach items="${funds}" var="fund"> 	
   				<TD><font color="red"><strong><c:out value="${fund}"/></strong></font></TD>
   			</c:forEach>
   			<TD>&nbsp;</TD>
   			<TD><font color="red"><strong><c:out value="${totalFund}"/></strong></font></TD>
   	   </TR>
   	</TABLE>
   	<div align="center">
   		<input type="button" value="返回" onclick="goBack();">
   		<input type="button" value="课题数目分布" onclick="showNumChart();">
   		<input type="button" value="中标经费分布" onclick="showFundChart();">
   	</div>
   	
   	
  <%
  if(session.getAttribute("graphURL") != null)
  {
  	String graphURL = (String)session.getAttribute("graphURL");
  	String filename = (String)session.getAttribute("filename");
  	session.removeAttribute("graphURL");
  	session.removeAttribute("filename");
   %>
<P ALIGN="CENTER" ><img src="<%= graphURL %>" width=500 height=300 border=0 usemap="#<%= filename%>" align="middle"></P> 
<%} %>
  </body>
</html>
